<ion-header>
  <ion-navbar>
    <ion-title>天气查询</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
  <!--隐式创建使用ngModel,ngForm-->
  <!--绑定现有使用fromGroup,ngControl-->
<form [formGroup] ="weatherFormGroup" (submit)="onSubmitCity(weatherFormGroup.value)" >
  <ion-item>
    <ion-label>城市：</ion-label>
  <ion-input type="text" [formControl]="weatherFormGroup.controls['cityInput']"></ion-input>
  </ion-item>
  <button ion-button type="submit" >查询</button>
</form>
  <ion-label>{{cityName}}</ion-label>
  <ion-spinner *ngIf="loadingFlag" icon="lines"></ion-spinner>

  <div *ngFor="let fore of forecastArray">
    <div>
    <ion-label class="item-head" >{{fore.date}}</ion-label>
    <ion-label>{{fore.high}}</ion-label>
    <ion-label>{{fore.low}}</ion-label>
    <ion-label>{{fore.fengxiang}}</ion-label>
    <ion-label>{{fore.fengli}}</ion-label>
    <ion-label>{{fore.type}}</ion-label>
    </div>
  </div>

</ion-content>
